﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true"
    CodeBehind="ListGovOfficeRegion.aspx.cs" Inherits="MockPrjTeam2.Pages.Views.ListGovOfficeRegion" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table style="width: 100%">
        <tr>
            <td colspan="2" style="font-family: Arial, Helvetica, sans-serif; font-size: large;
                color: #639A18; font-weight: bold">
                Government Office Region List
            </td>
        </tr>
        <tr>
            <td style="width: 593px">
                <asp:LinkButton ID="lbtnAll" runat="server" CommandName="0-9-a-z" OnCommand="StartWithByNames">All</asp:LinkButton>
                &nbsp;|
                <asp:LinkButton ID="lbtn09" runat="server" CommandName="0-9" OnCommand="StartWithByNames">0-9</asp:LinkButton>
                &nbsp;|
                <asp:LinkButton ID="lbtnAE" runat="server" CommandName="a-e" OnCommand="StartWithByNames">A B C D E</asp:LinkButton>
                &nbsp;|
                <asp:LinkButton ID="lbtnFJ" runat="server" CommandName="f-j" OnCommand="StartWithByNames">F G H I J</asp:LinkButton>
                &nbsp;|
                <asp:LinkButton ID="lbtnKN" runat="server" CommandName="k-n" OnCommand="StartWithByNames">K L M N</asp:LinkButton>
                &nbsp;|
                <asp:LinkButton ID="lbtnOR" runat="server" CommandName="o-r" OnCommand="StartWithByNames">O P Q R</asp:LinkButton>
                &nbsp;|
                <asp:LinkButton ID="lbtnSV" runat="server" CommandName="s-v" OnCommand="StartWithByNames">S T U V</asp:LinkButton>
                &nbsp;|
                <asp:LinkButton ID="lbtnWZ" runat="server" CommandName="w-z" OnCommand="StartWithByNames">W X Y Z</asp:LinkButton>
                &nbsp;| &nbsp;
            </td>
            <td>
                <asp:CheckBox ID="CheckBoxInActive" runat="server" Text="Include In-active" AutoPostBack="True"
                    TextAlign="Right" OnCheckedChanged="CheckBoxInactiveCheckedChanged" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="grvGovOfficeRegion" runat="server" AutoGenerateColumns="False" Width="100%"
                AllowPaging="True" PageSize="5" OnPageIndexChanging="grvGovOfficeRegion_PageIndexChanging">
                    <Columns>
                         <asp:TemplateField HeaderText="GovtOfficeRegionName">
                            <ItemTemplate>
                               <asp:LinkButton ID="LinkButtonGovtOfficeRegionName" CausesValidation="false" runat="server" CommandName='<%# Eval("GovOfficeRegionID") %>' CommandArgument='<%#Eval("IsActive") %>'
                                    OnClientClick='<%# !(bool)Eval("IsActive") ? "return Confirm_Active();" : string.Empty %>' 
                                    OnCommand="LbtnGovOfficeRegionName_Command"><%# Eval("GovtOfficeRegionName")%>
                                </asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Description" DataField="Description" />
                        <asp:TemplateField HeaderText="County" SortExpression="County">
                            <ItemTemplate>
                                <asp:Label ID="LabelCounty" runat="server" Text='<%# Eval("CountyName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Is Active?">
                            <ItemTemplate>
                                <asp:Label ID="LabelIsActive" runat="server" Text='<%#(bool) Eval("IsActive") ? "Yes" :"No" %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <blockquote>There are no items to show.</blockquote>
                    </EmptyDataTemplate>
                  <PagerStyle CssClass="pagination_table"></PagerStyle>
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
